﻿using System.Collections;
using UnityEditor;
using UnityEditor.UI;
using UnityEngine;

namespace Nirvana
{
    [CanEditMultipleObjects]
    [CustomEditor(typeof(CircleImage), true)]
    public class CircleImageEditor : ImageEditor
    {
        private SerializedProperty segmentCount;
        private SerializedProperty fillPercent;

        protected override void OnEnable()
        {
            base.OnEnable();
            SerializedObject serializedObject = base.serializedObject;
            this.segmentCount = serializedObject.FindProperty("segmentCount");
            this.fillPercent = serializedObject.FindProperty("fillPercent");
        }

        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            base.serializedObject.Update();
            EditorGUILayout.PropertyField(this.segmentCount);
            EditorGUILayout.PropertyField(this.fillPercent);
            base.serializedObject.ApplyModifiedProperties();
        }

    }
}

